<%String mysJDBCDriver = "com.mysql.jdbc.Driver"; 
	String mysURL = "jdbc:mysql://mysql2.cs.stonybrook.edu:3306/jedale"; 
	String mysUserID = "jedale"; 
	String mysPassword = "107200855";
	Class.forName(mysJDBCDriver).newInstance();
	java.util.Properties sysprops=System.getProperties();
	sysprops.put("user",mysUserID);
	sysprops.put("password",mysPassword);
	java.sql.Connection conn=null;
	conn=java.sql.DriverManager.getConnection(mysURL,sysprops);
	System.out.println("Connected successfully to database using JConnect");

	java.sql.Statement stmt1=conn.createStatement();
try{            	

	String UserName = request.getParameter("UserName");
	String id = request.getParameter("IDNumber");
	//String sesUser = session.getValue("login");
	if(UserName.equals((String)session.getValue("login")) || session.getValue("empLevel") == "1" || session.getValue("empLevel") == "2")
		{
			stmt1.executeUpdate("DELETE FROM Customer WHERE  Person.CustomerID = " + java.lang.Integer.parseInt(id));
			stmt1.executeUpdate("DELETE FROM Person WHERE Person.SSN ="  + java.lang.Integer.parseInt(id));
			if(UserName.equals((String)session.getValue("login")))
			{
				session.invalidate();
			}

		}
	response.sendRedirect("index.jsp");
} catch(Exception e)
{
	e.printStackTrace();
	out.print(e.toString());
}

%>